package com.bosch.in.jfree.chart;

import java.awt.Color;
import java.awt.Shape;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.NumberFormat;

import javax.servlet.http.HttpServletRequest;

import org.jfree.chart.imagemap.ToolTipTagFragmentGenerator;
import org.jfree.chart.imagemap.URLTagFragmentGenerator;
import org.jfree.chart.labels.CategoryToolTipGenerator;
import org.jfree.chart.labels.StandardCategoryToolTipGenerator;
import org.jfree.chart.urls.CategoryURLGenerator;
import org.jfree.data.category.CategoryDataset;


/**
 * <p>
 * <b>Title: </b> JfreeChartIntf
 * </p>
 * <p>
 * <b>Description: </b>This interface contains abstract method for the
 * generation of chart.
 * </P>
 * <p>
 * <b>Copyright: (c) </b>2011
 * </p>
 * <p>
 * <b>Company: </b> Robert Bosch India Limited
 * </p>
 * 
 * @author �m�t ��m� [apn1kor]
 * @version 1.0 June 29, 2011
 */
public interface JfreeChartIntf {

	String FONT_FAMILY = "verdana";
	String IMAGEMAP_SUFFIX = "_imagemap";
	/**
	 * 
	 * 
	 * 
	 * @param request
	 * @param printWriter
	 * @param width
	 * @param height
	 * @return
	 * @throws IOException
	 */
	public abstract String createChart(HttpServletRequest request,
			PrintWriter printWriter, int width, int height, String saveTofilepath) throws IOException;

	/**
	 * 
	 * @return
	 */
	public abstract NumberFormat getNumberFormatRightYAxis();

	/**
	 * 
	 * @return
	 */
	public abstract NumberFormat getNumberFormatLeftYAxis();

	/**
	 * 
	 * @return
	 */
	public abstract Color[] getRightAxisColors();

	/**
	 * 
	 * @return
	 */
	public abstract Color[] getLeftAxisColors();

	/**
	 * 
	 * @return
	 */
	public abstract String getRightYAxisLabel();

	/**
	 * 
	 * @return
	 */
	public abstract String getLabelYAxisLeft();

	/**
	 * Creates a dataset, consisting of two series of monthly data.
	 * 
	 * @return the dataset.
	 */
	public abstract CategoryDataset createDatasetRightAxis();

	/**
	 * Creates a dataset, consisting of two series of monthly data.
	 * 
	 * @return the dataset.
	 */
	public abstract CategoryDataset createDatasetLeftAxis();

	/**
	 * Returns the tool tip to display in the chart related to the Left y axis
	 * 
	 * @return - <code>StandardCategoryToolTipGenerator</code> Object
	 */
	public abstract StandardCategoryToolTipGenerator getToolTipGeneratorLeftYAxis();

	/**
	 * Returns the tool tip to display in the chart related to the right y axis
	 * 
	 * @return - <code>StandardCategoryToolTipGenerator</code> Object
	 */
	public abstract StandardCategoryToolTipGenerator getToolTipGeneratorRightYAxis();

	/**
	 * Returns the <code>CategoryURLGenerator</code> object to URL for the each
	 * & every tick in the graph for left Y-axis
	 * 
	 * @return - <code>CategoryURLGenerator</code> Object
	 */
	public abstract CategoryURLGenerator getURLGeneratorLeftYAxis();

	/**
	 * Returns the <code>CategoryURLGenerator</code> object to URL for the each
	 * & every tick in the graph for right Y-axis
	 * 
	 * @return - <code>CategoryURLGenerator</code> Object
	 */
	public abstract CategoryURLGenerator getURLGeneratorRightYAxis();

	/**
	 * Returns title of the X-Axis to show in the chart
	 * 
	 * @return - <code>String</code> Object, label of the X-Axis to show in the
	 *         chart
	 */
	public abstract String getLabelXAxis();

	/**
	 * 
	 * @return
	 */
	public abstract String getChartSubtitle();

	/**
	 * 
	 * @return
	 */
	public abstract String getChartTitle();

	public CategoryToolTipGenerator getToolTipGeneratorLeftYAxis1();

	public CategoryURLGenerator getURLGeneratorLeftYAxis1();

	public Shape[] getLeftAxisShapes1();

	public Color[] getLeftAxisColors1();

	public CategoryDataset createDatasetLeftAxis1();
	
	public URLTagFragmentGenerator getURLTagFragmentGenerator();
	
	public ToolTipTagFragmentGenerator getToolTipTagFragmentGenerator() ;
	/**
	 * 
	 * @return boolean - need to place image map in the print stream or not (default <code>true</code>)
	 */
	public boolean writeImageMap();
	/**
	 * 
	 * set the filename: need to save image map in specified file or only in temporary directory (if <code>null</code>)
	 */
	public void setFilename(String filename);
}